import type { VNode, ComponentInternalInstance } from 'vue'
export interface MessageProps {
  message?: string
  duration?: number
  showClose?: boolean
  type?: 'success' | 'warning' | 'error' | 'message'
  onDestroy: () => void
  offset?: number
  id: string
}
// 排除onDestroy 方法
export type CreateMessageProps = Omit<MessageProps, 'onDestroy' | 'id'>

// 组件实例
export interface MessageContext {
  id: string
  vnode: VNode
  props: MessageProps
  vm: ComponentInternalInstance //vuw实例
  destroy: () => void
}
